import { http } from "@/utils/http";
const apiRouter = `admin-role`;

//修改
export const putV1OmsRole = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=update`, { data });
};

//新增
export const postV1OmsRole = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=create`, { data });
};

//分页列表
export const getV1OmsRolePage = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=list`, { data });
};

//下拉框选择器
export const getV1OmsRoleSelector = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=selector`, { data });
};

//获取详情
export const getV1OmsRoleDetail = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=info`, { data });
};

//删除
export const deleteV1OmsRoleDetail = (data?: Record<string, any>) => {
  return http.request<any>("post", `/${apiRouter}?action=delete`, { data });
};
